import vue from "@vitejs/plugin-vue";
import autoVueImportApi from "unplugin-auto-import/vite"; // 自动导入 vue api,不用显式手动调用
import { defineConfig } from "vite";

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    vue(),
    autoVueImportApi({
      dts: true,
      include: [
        /\.[tj]sx?$/, // .ts, .tsx, .js, .jsx
        /\.vue$/,
        /\.vue\?vue/, // .vue
        /\.md$/, // .md
      ],
      imports: [
        // presets
        "vue",
      ],
    }),
  ],
});
